#!/bin/bash
echo "please input a num"
read a
echo "please input a num again"
read b
echo "please input a operator"
read c
declare -i sum
case "$c" in
	"+")
	sum=$a+$b
	echo "the result is $sum"
	;;
	"-")
	sum=$a-$b
	echo "the result is $sum"
	;;
	"/")
		awk 'BEGIN{printf "%.2f\n",'$a'/'$b'}'
	#sum=$a/$b
	#echo "the result is $sum"
	;;
	"*")
	sum=$a*$b
	echo "the result is $sum"
	exit 1
esac

